#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import set_state_feedback_rate_ms
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.set_state_feedback_rate_ms(id_num=data.id_num,n_ms=data.n_ms)
    rospy.loginfo("set_state_feedback_rate_ms_node")


def listener():
    rospy.init_node("set_state_feedback_rate_ms", anonymous=True)
    rospy.Subscriber("set_state_feedback_rate_ms", set_state_feedback_rate_ms, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

